home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CDsupport / IDer / Routines / ProcessFlags.s < prev    next >
Text File  |  1997-02-18  |  646b  |  31 lines

  1. MODE_ONE    Equ    0
  2. MODE_ALL    Equ    1
  3. MODE_TWO    Equ    2
  4.  
  5. ProcessFlags:    Clr.L    _Mode        ;clear all flag settings
  6.  
  7.     Move.L    _Flags(PC),A0        ;were any flags specified
  8.     Cmp.L    #0,A0
  9.     Beq.S    .ProcessDone
  10.  
  11. .ProcessLoop    Move.B    (A0)+,D0        ;get a flag
  12.     Beq.S    .ProcessDone
  13.     Bsr.S    ChangeCase
  14.  
  15.     Cmp.B    #'A',D0        ;is it ALL
  16.     Bne.S    .notAll    
  17.     Move.B    #MODE_ALL,_Mode        ;set the approprate bit
  18. .notAll
  19.     Cmp.B    #'T',D0        ;is it TWO
  20.     Bne.S    .notTwo    
  21.     Move.B    #MODE_TWO,_Mode        ;set the approprate bit
  22. .notTwo
  23.     Cmp.B    #'I',D0        ;is it INSENSITIVE
  24.     Seq    _Insensitive        ;set the approprate bit
  25.  
  26.     Cmp.B    #'Q',D0        ;is it QUOTE
  27.     Seq    _Quote        ;set the approprate bit
  28.  
  29.     Bra.S    .ProcessLoop
  30. .ProcessDone    Rts
  31.